function loadXMLDoc(fileName) {
    if (window.ActiveXObject) {
        xhttp=new ActiveXObject("Msxml2.XMLHTTP.3.0");
    } else {
        xhttp=new XMLHttpRequest(); 
    }
    xhttp.open("GET", fileName, false);
    xhttp.send("");
    return xhttp.responseXML;
}

function loadXSL(xmlFile, xslFile, containerID) {
    var xml = loadXMLDoc(xmlFile);
    var xsl = loadXMLDoc(xslFile);
    
    if (window.ActiveXObject) { // For IE
        var ex = xml.transformNode(xsl);
        document.getElementById(containerID).innerHTML = ex;
    } else if (document.implementation && document.implementation.createDocument) { // For Mozilla, Firefox, Opera, etc.
        var xsltProcessor = new XSLTProcessor();
        xsltProcessor.importStylesheet(xsl);
        var resultDocument = xsltProcessor.transformToFragment(xml, document);
        document.getElementById(containerID).appendChild(resultDocument);
    }
}